/*
 * @Author: LVGRAPE
 * @LastEditors: LVGRAPE
 */

#ifndef _DRV_LED_H
#define _DRV_LED_H

#include "drv_pin.h"

#define LED1_PIN PA6
#define LED2_PIN PA7
#define LED3_PIN PB0
#define LED4_PIN PB1

#ifdef __cplusplus
extern "C"
{
#endif

#define LED1_ON() IO_SET(GPIOA, GPIO_PINS_6)
#define LED1_OFF() IO_RESET(GPIOA, GPIO_PINS_6)
#define LED2_ON() IO_SET(GPIOA, GPIO_PINS_7)
#define LED2_OFF() IO_RESET(GPIOA, GPIO_PINS_7)
#define LED3_ON() IO_SET(GPIOB, GPIO_PINS_0)
#define LED3_OFF() IO_RESET(GPIOB, GPIO_PINS_0)
#define LED4_ON() IO_SET(GPIOB, GPIO_PINS_1)
#define LED4_OFF() IO_RESET(GPIOB, GPIO_PINS_1)

    void led_pins_init(void);
    void led_on(uint8_t led);
    void led_off(uint8_t led);
void led_set_brightness1(uint8_t brightness);
void led_set_brightness2(uint8_t brightness);
void led_set_brightness3(uint8_t brightness);
void led_set_brightness4(uint8_t brightness);
#ifdef __cplusplus
}
#endif

#endif /* _DRV_LED_H */
